The api.cheerio library is deprecated and
will be removed in a future version.
Cheerio is only used for the scripting API while the server internally
uses node-html-parser for HTML parsing. Removing
cheerioreduces bundle size and maintenance overhead.
Before (cheerio):
const $ = api.cheerio.load(html);
const title = $('h1').text();
const links = $('a').map((i, el) => $(el).attr('href')).get();
After (htmlParser):
const root = api.htmlParser.parse(html);
const title = root.querySelector('h1')?.textContent;
const links = root.querySelectorAll('a').map(a => a.getAttribute('href'));